<?php

namespace App\Http\Logic\Admin;

use App;
use App\Common\Status;
use App\Models\Admin as adminModel;

class AuthLogic
{
    public static function loginCheck($params)
    {
        $where = [
            ['is_deleted' ,'=', Status::NOT_DELETE],
            ['status' ,'=', Status::REGULAR],
            ['username' ,'=', $params['account']],
        ];
        $user_mes = adminModel::where($where)->first();
        if ($user_mes) {
            return $user_mes;
        } else {
            return [];
        }
    }
}
